#include "latchandnixie.h"
#include "kdbandtimer.h"
#include "ds18b20.h"

static unsigned char KEY_number = 0,k_count = 0,t_count = 0,n_count = 0;
float T = 0;unsigned int t1 = 12;

void main(void)
{
	Latch(RELAY,0x00);
	ds_convert();
	Delay1ms(1000);
	Timer2Init();
	while(1)
	{
		//if(k_count == 99)
//		KEY_number = Key();
//		if(KEY_number)
//			Latch(LED,KEY_number);
//	if(t_count == 199)
//	{
//		T = t_return();
//		t1 = (unsigned int)T;
//	}
	nixie_show(7,t1/10);
	nixie_show(8,t1%10);

	}
}

void timer2() interrupt 12 using 1//300us
{
	static unsigned char count = 0;
	T2L = 0xF0;		//设置定时初值
	T2H = 0xF1;		//设置定时初值
	k_count++;
	t_count++;
	n_count++;
	if(k_count == 100)
		k_count = 0;
	if(t_count == 200)
		t_count = 0;
	if(t_count == 5)
		t_count = 0;
	nixie_loop();
}